<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use \DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class MysqlController extends Controller
{
    //
    public function getSql(){
    	return view('test');
    	// echo 'a';
    }

    //连贯操作
    public function getSql1(){
    	// $res = DB::table('user')->where('id','<',7)->get();

    	// $res = DB::table('user')->select('name')->where('name','like','%张%')->get();

    	// $res = DB::table('user')->where('id','=',2)->orWhere('id',6)->get();

    	// $res = DB::table('user')->count();

    	// $res = DB::table('user')->max('age');

    	// $res = DB::table('user')->avg('age');

    	fun();
    	// dd($res);
    }
}
